#pragma once

#include "Precompiled.hpp"

class FactoryInterface;

class TypelessHandle
{
public:
  TypelessHandle(FactoryInterface* myFactory_, unsigned int index_, unsigned int ID_);
  TypelessHandle();
  virtual ~TypelessHandle();
  bool operator == (const TypelessHandle& rhs);
  void Delete();
  bool IsValid() const;
  void* GetData();
  const void* GetData() const;
  unsigned int GetIndex() const;
  unsigned int GetID() const;
private:
  FactoryInterface* myFactory;
  unsigned int index;
  unsigned int ID;
  mutable bool valid;
};